1590s, in reference to the horizontal and vertical lines of soldiers marching in formation; thence generalized to "common soldiers" (1796) and "common people" (1860).
The people who form the major portion of any group or organization, excluding the leaders: “The rumors of corruption at the top disturbed the party's rank and file.” This phrase comes from military usage, where enlisted men march in ranks (close abreast) and files (one behind another), whereas officers march outside these formations.